﻿<Window x:Class="SolickManagerV3_4.Windows.AddOrEditOperationWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:SolickManagerV3_4.Windows"
        mc:Ignorable="d"
        WindowStartupLocation="CenterScreen"
        Icon="Images/SolulCompIcon.ico"
        Title="SoulComp Manager" Height="440" Width="400">
    <Border Width="350"
            Height="380"
            CornerRadius="10"
            Background="#3993DD"
            Padding="25">
        <StackPanel>
            <TextBlock Foreground="White"
                       Height="25"
                       VerticalAlignment="Top"
                       HorizontalAlignment="Center"
                       FontSize="20"
                       FontFamily="Inter"
                       FontWeight="Medium"
                       Text="Заявка"
                       Margin="0 0 0 15"/>

            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Дата"
                           Foreground="White"
                           FontFamily="Inter"
                           FontSize="16"
                           Height="20"/>
                <TextBox x:Name="DataTextBox"
                         Style="{DynamicResource RoundTextBox}" 
                         Width="160"
                         Margin="10 0"
                         Text="{Binding DataOperation, UpdateSourceTrigger=PropertyChanged}"/>
                <Button Content="сегодня"
                        Style="{DynamicResource ButtonRoundStyle}"
                        Background="White"
                        Width="85"
                        FontSize="14"
                        FontWeight="Medium"
                        Click="SetToday"/>
            </StackPanel>

            <StackPanel Orientation="Horizontal"
                        Margin="0 10 0 0">
                <TextBlock Text="Дебет"
                           Foreground="White"
                           FontFamily="Inter"
                           FontSize="16"
                           Height="20"/>
                <ComboBox Width="238" 
                          Margin="18 0 0 0" 
                          ItemsSource="{Binding BankAccounts}"
                          DisplayMemberPath="Title"
                          SelectedItem="{Binding DebetBankAccount}"/>
            </StackPanel>

            <StackPanel Orientation="Horizontal"
                        Margin="0 10 0 0">
                <TextBlock Text="Кредит"
                           Foreground="White"
                           FontFamily="Inter"
                           FontSize="16"
                           Height="20"/>
                <ComboBox Width="238" 
                          Margin="10 0 0 0" 
                          ItemsSource="{Binding BankAccounts}"
                          SelectedItem="{Binding CreditBankAccount}"
                          DisplayMemberPath="Title"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Margin="0 10 0 0">
                <TextBlock Text="Сумма"
                           Foreground="White"
                           FontFamily="Inter"
                           FontSize="16"
                           Height="20"/>
                <TextBox x:Name="AmountTextBox"
                         Style="{DynamicResource RoundTextBox}" 
                         Width="238"
                         Margin="14 0 0 0"
                         Text="{Binding AmountOperation, UpdateSourceTrigger=PropertyChanged}"/>
            </StackPanel>

            <Label Content="Объект"  
                   Foreground="White"
                   FontFamily="Inter"
                   FontSize="16"
                   Height="28" 
                   Margin="0 10 0 0"/>
            <Border CornerRadius="5" Background="White" Padding="5" >
                <TextBox Style="{DynamicResource RoundTextBox}"
                         Text="{Binding ObjectOperation}"
                         TextWrapping="Wrap"
                         FontSize="12"
                         Foreground="Black"
                         FontFamily="Inter"
                         Width="290"
                         Height="78"
                         HorizontalAlignment="Center"/>
            </Border>

            <Button x:Name="SaveButton"
                    Style="{DynamicResource ButtonRoundStyle}"
                    Content="Сохранить"
                    Width="260"
                    Margin="0 10 0 0"
                    Height="35"
                    Background="White"
                    FontSize="20"
                    FontWeight="Medium"
                    FontFamily="Inter"
                    Click="SaveOperation"/>
        </StackPanel>
    </Border>
</Window>
